<?php
    require("./Utils.php");

    $post = getJsonParamter();

    $image = $post['image'];
    $id = $post['id'];
    $sql = "UPDATE pet_type SET image = ? WHERE id = ?";

    $conn = getConnection();

    $res = execute($conn, $sql, $image, $id);

    if($res) echo getJson(200, "修改成功", null);

    else echo getJson(500, "修改失败", null);
?>